package pers.cz.service.impl;

import pers.cz.business.QueryMenuBusiness;
import pers.cz.model.Menu;
import pers.cz.pub.BeanHelper;
import pers.cz.service.QueryMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: PostGirl-panent
 * @description: QueryMenuServiceImpl
 * @author: Cheng Zhi
 * @create: 2021-04-06 10:38
 **/
@Service
public class QueryMenuServiceImpl implements QueryMenuService {

    @Autowired
    BeanHelper beanHelper;

    @Override
    public List<Menu> getAllMenuByUserId(Integer userId) {

        QueryMenuBusiness queryMenuBusiness = new QueryMenuBusiness();
        queryMenuBusiness.setMapper(beanHelper);

        return queryMenuBusiness.getAllMenuByUserId(userId);
    }
}
